<template>
	<view>
		<shmily-drag-image keyName="src" :number="images.length" v-model="images"></shmily-drag-image>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				prevPage: null,
				images: [],
			}
		},
		watch: {
			images(val) {
				this.setImages();
			}
		},
		onLoad(option) {
			var pages = getCurrentPages()
			this.prevPage = pages[pages.length - 2];
			this.images = this.prevPage.data.media;
		},
		methods: {
			setImages() {
				this.prevPage.$vm.resetCoverUrl(this.images)
			}
		}
	}
</script>

<style lang="scss" scoped>

</style>